<?php

function shop_shortcode( $atts, $content = null ) {
	
	extract( shortcode_atts( array(
			'title' => '',
			'post_limit' => '',
			'category' => '',
		), $atts ) );
	
	if( $atts['title'] ) { $title = $atts['title']; } else { $title = __('Our Shop','qns'); }
	if( $atts['post_limit'] ) { $post_limit = $atts['post_limit']; } else { $post_limit = '4'; }
	if( $atts['category'] ) { $category = 'category="' . $atts['category'] . '"'; }
	
	$output = '';
	$output .= '<div class="title-block">';
	$output .= '<h3>' . $title . '</h3>';
	$output .= '</div>';
	$output .= '<div class="featured-products-4">';
	$output .= do_shortcode('[product_category ' . $category . ' columns="4" per_page=' . $post_limit . ']');
	$output .= '</div>';
	
	return $output;

}

add_shortcode( 'shop', 'shop_shortcode' );

?>